﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Library.Web.ViewModels;

namespace Library.Web.Controllers
{
    public class RequestBookController : Controller
    {
        public ActionResult Index()
        {
            return View();
        }

		[HttpPost]
		public ActionResult Index(RequestBookViewModel requestViewModel)
		{
			if (ModelState.IsValid)
			{
                requestViewModel.Save();
				return RedirectToAction("Index");
			}

			return View(requestViewModel);
		}

    }
}
